home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / regfind.zip / REGFIND.TXT < prev   
Text File  |  1994-08-31  |  8KB  |  200 lines

  1. Regfind - a Win32 registry search utility
  2.  
  3. 1. Introduction
  4.  
  5. Regfind is a utility for searching through a win32 registry. This is
  6. the first version of the program and is meant for use with NT and
  7. other win32 platforms. It has been tested with NT 3.5 beta 2. Regfind
  8. started off as a perl utility for Windows NT but this version has
  9. rewritten in C. It has not undergone exhaustive testing and hence I
  10. would welcome any bug-reports you might have. This utility does not
  11. write to the registry and should, therefore, not cause any damage to
  12. it. Microsoft has stated over and over again that modifications to
  13. the registry can render the system unusable. Regfind does not modify
  14. the registry in any way. However, please read the disclaimer in
  15. section 6 below.
  16.  
  17. Regfind is a console application: you can run it from a dos box just
  18. like the old command line programs. I intend to put a GUI front-end
  19. on it sometime but I cannot promise when that will be. Regfind accepts
  20. various parameters and they are explained in the section below.
  21.  
  22. Thanks to this program I have been able to unearth vestiges of
  23. obsolete data. After I had changed network names on a few nodes I
  24. noticed that my machine was extremely slow when certain programs were
  25. started. I searched for old machine names, deleted them from the
  26. registry and speed was restored. Those applications were waiting for
  27. the old hosts to respond and only after a timeout error was reported
  28. did they continue. Thus removing those names from the registry caused
  29. the application to start faster.
  30.  
  31. The current version is 0.3 dated 31-August-1994.
  32.  
  33. 2. Usage
  34.  
  35. The command line syntax for executing regfind is:
  36.     Regfind {<control argument>} [pattern]
  37. Regfind may be followed by zero or more control arguments which, in
  38. turn, may be followed by a pattern to be searched for. Omitting pattern
  39. and control arguments will result in all data in the registry to be
  40. shown. This can be quite large; you can restrict it by turning on
  41. various filter by means of control arguments. Control arguments start
  42. with a "-" or a "/" character; in this document we will use "-".
  43.  
  44. The generated output is displayed in the form:
  45.     Full\key\path\separated\by\slashes  modification_time
  46.       value1 = data1
  47.       value2 = data2
  48.       ...
  49. Modification time is only displayed on Windows NT.
  50.  
  51. <control argument> may one of the following:
  52.     -key <key pattern>
  53.         the keyname specifies a pattern to search for in the registry
  54.         keys. All subtrees which contain <key pattern> will displayed.
  55.     -value <value pattern>
  56.         the value pattern specifies a pattern to search for in values.
  57.         All value names which contain <value pattern> will be displayed.
  58.     -data <data pattern>
  59.         the data pattern specifies a pattern to search for in data.
  60.         All string data which contain <data pattern> will be
  61.         displayed.
  62.     -any <pattern>
  63.         this is the same as typing <pattern> on its own; in other
  64.         words, "regfind -any xxx" is equivalent to "regfind xxx". This
  65.         will cause the program to display all value/data pairs and keys
  66.         which contain <pattern>.
  67.     -hive <hive name>
  68.         hive name must be one of the 4 predefined hives:
  69.             HKEY_LOCAL_MACHINE
  70.             HKEY_CURRENT_USER
  71.             HKEY_USERS
  72.             HKEY_CLASSES_ROOT
  73.     -node \\nodename
  74.         nodename must be running a win32 OS and must be accessible through
  75.         a Microsoft supported network.
  76.  
  77.     -before 19yy/mm/dd [hh:mm]
  78.         this will show all keys and its associated value/data
  79.         pairs which were modified before the specified time.
  80.         Available only on NT. 
  81.     -after  19yy/mm/dd [hh:mm]
  82.         this will show all keys and its associated value/data
  83.         pairs which were modified after the specified time 
  84.         Available only on NT. 
  85.  
  86.     -hidevalues
  87.         do not show value/data pairs; useful if only keys are
  88.         required
  89.     -depth <number>
  90.         do not go deeper than <number> levels deep when traversing
  91.         the registry tree. <number> must be >= 1.
  92.     -case
  93.         makes searches case-sensitive; default is case-blind.
  94.     -help
  95.         shows a short help screen
  96.  
  97. Pattern is a text string which specifies the data to be searched for
  98. in the registry. For example, typing "regfind blue" will show you all
  99. keys, value/data pairs which have the string "blue" in the key, value
  100. or data. This is the same as typing "regfind -any blue". My favorite
  101. is "regfind raju" which shows me where the operating system has
  102. squirrelled away my name. "Regfind -case raju" will perform a case-
  103. sensitive search. Try it out with your name.
  104.  
  105. To specify a parameter with embedded blanks, enclose it in
  106. double-quotes. For example 'regfind -key "Control Panel"' will display
  107. the control panel subtree in all 4 hives.
  108.  
  109. The -key, -value, -data and -hive control arguments may be used to
  110. restrict the amount of information displayed. They are like filters;
  111. specifying more than one will cause the filters to restrict the
  112. displayed information even more. Thus, "regfind -key xxx" will show
  113. all keys, values and data which are under a key which has xxx in it.
  114. "regfind -key xxx -value yyy" will only show those keys values and
  115. data which have xxx in the keys and yyy in the value names. Similarly,
  116. "regfind -key xxx -value yyy -data zzz" will only show those which
  117. have xxx in the keys, yyy in the values and zzz in the data. The search
  118. can be restricted even more by turning on the -hive control argument.
  119. Currently, there are only 4 hives predefined in the Win32 registry
  120. (refer to the win32 documentation for details). The -any control
  121. argument cannot be used with -key, -value or -data.
  122.  
  123. Case-sensitivity can be turned on with the -case control argument.
  124. This affects the items specified by the -key, -value, -data, -any and
  125. -hive. The value/data line is shortened so that it fits into a normal
  126. window with 80 columns.
  127.  
  128.  
  129. 3. Examples
  130.  
  131. Typing "regfind" on its own will display the whole registry:
  132. everything under all the four hives. Typing "regfind blue" (which is
  133. incidentally the same as typing "regfind -any blue") will show you
  134.     - all subtrees where blue occurs in the full key name
  135.     - all value/data pairs where blue occurs in the value name
  136.     - all value/data pairs where blue occurs in the data field
  137.  
  138. If you are looking for a certain string in the key, value or data
  139. you could use the appropriate control argument. To see all subtrees
  140. of the control panel type "regfind -key panel". This will not show
  141. value/data pairs where the word control is in the data or value
  142. name.
  143.  
  144. To turn on case-sensitivity use -case. I prefer the default case-blind
  145. searches. To hide value-data pairs use the -hidevalues control
  146. argument.
  147.  
  148. To see everything under the HKEY_LOCAL_USER hive, type
  149. "regfind -hive local_user". For just the keys under the same hive
  150. type "regfind -hive local_us -hidevalues".
  151.  
  152. For remote registry access on node humbug type "regfind -node \\humbug".
  153. Note that only two of the four pre-defined hives (HKEY_LOCAL_MACHINE,
  154. HKEY_USERS) are accessible over a network. The command above will
  155. display everything in those two hives. Typing
  156. "regfind -node \\humbug humbug" will reveal where the machine stores
  157. the machine name.
  158.  
  159.  
  160. 4. Contacting me
  161.  
  162. I would welcome any constructive criticism regarding the program, its
  163. usefulness to you and any assorted ideas you have which might improve
  164. it. However, I cannot guarantee a response and, further, I cannot
  165. guarantee that I will fix bugs and/or incorporate your ideas into a
  166. future version.
  167.  
  168. Mail address:
  169.     Raju Varghese
  170.     Intellisoft Inc.
  171.     Stoeckmattstr. 3
  172.     CH-5316 Leuggern
  173.     Switzerland
  174.  
  175. Fax:        +41 56 455 140
  176. email:      raju@inso.pr.net.ch
  177. compuserve: 100116,1001
  178.  
  179.  
  180. 5. Future enhancement
  181.  
  182. This version is admitedly quite spartan. It is satisfactory for simple
  183. searches. However, I intend to expand it. A Windows GUI will be added
  184. at some point. The patterns are simple text strings; I intend to
  185. implement full regular expressions in future.
  186.  
  187.  
  188. 6. Legalese
  189.  
  190. Regfind is supplied "as is" without warranty of any kind, either
  191. expressed or implied, including, but not limited to, the implied
  192. warranties of mechantability and fitness for a particular purpose.
  193. The entire risk as to the quality and performance of the program is
  194. with you. Should the program prove defective, you assume the cost of
  195. all necessary servicing, repair or correction.
  196.  
  197.  
  198. Copyright (c) 1994 Raju Varghese, Intellisoft Inc., Switzerland
  199. All Rights Reserved
  200.